package com.mingrisoft.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.lyq.bean.StudentDao;
import com.lyq.bean.StudentEntity;

public class FindStudentServlet extends HttpServlet{

	private static final long serialVersionUID = 1L;
	protected void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		// 实例化StudentDao
		StudentDao dao = new StudentDao();
		List<StudentEntity> list = dao.findStudent();
		// 将图书集合放置到request之中
		request.setAttribute("list", list);
		// 请求转发到book_list.jsp
		request.getRequestDispatcher("sl//10/11/student_list.jsp").forward(request, response);
	}
	
	public FindStudentServlet() {
		// TODO Auto-generated constructor stub
	}

}
